package shejimoshi.jianzaozhemoshi;

public class Client {
    public static void main(String[] args) {
        // 创建指挥者对象
        CarDirector director = new CarDirector();

        // 创建具体建造者对象
        ConcreteCarBuilder builder = new ConcreteCarBuilder();

        // 使用指挥者来构建汽车对象
        Car car = director.construct(builder);

        // 打印汽车的属性，以验证对象是否正确构建
        System.out.println("Car created with:");
        System.out.println("Engine: " + car.getEngine());
        System.out.println("Tires: " + car.getTires());
        System.out.println("Color: " + car.getColor());
    }
}
